﻿<%@ Page Language="C#" Theme="skin_control" AutoEventWireup="true" CodeFile="QuarterPlanAdd.aspx.cs"
    Inherits="QuarterPlan_QuarterPlanAdd" %>

<%@ Register Assembly="EeekSoft.Web.PopupWin" Namespace="EeekSoft.Web" TagPrefix="cc2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>年计划添加</title>
    <link href="../App_Themes/css/main_css.css" rel="stylesheet" type="text/css" />
    <script src="../Js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        <!--
        function department(str) {
            window.open('../WebCommon/Department.aspx?SID=' + str, '', 'width=700,height=580,top=200, left=300');
        }
        -->   
       
    </script>
    <script type="text/javascript" language="javascript">
        function userinfo(str) {
            window.open('../WebCommon/UserInfo.aspx?SID=' + str, '', 'width=700,height=580,top=150, left=300');
        }
    </script>
    <script type="text/javascript" language="javascript">
        function slavedepartment(str) {
            window.open('../WebCommon/DepartmentSlave.aspx?SID=' + str, '', 'width=700,height=580,top=80, left=250');
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="True">
    </asp:ScriptManager>
    <div>
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td class="firstbjcolor" colspan="8" style="height: 14px;">
                    <span class="currentHere">当前位置:年计划管理-&gt;添加部门年计划</span>
                </td>
            </tr>
            <tr>
                <td style="height: 1; width: 100%;">
                </td>
            </tr>
            <tr>
                <td colspan="8" style="background-image: url(../images/secondRow.gif); background-repeat: repeat-x;
                    height: 30px;" class="tdControlRow">
                    部门:<asp:DropDownList ID="drpDepartment" runat="server" SkinID="dropdownlistSkin"
                        AutoPostBack="True" OnSelectedIndexChanged="drpDepartment_SelectedIndexChanged">
                    </asp:DropDownList>
                    责任人：<span class="currentHere"><asp:DropDownList ID="drpMasterPeople" runat="server">
                    </asp:DropDownList>
                    </span>年份:<asp:DropDownList ID="drpYear" runat="server" AutoPostBack="True" OnSelectedIndexChanged="drpYear_SelectedIndexChanged"
                        SkinID="dropdownlistSkin">
                    </asp:DropDownList>
                    年周期:<asp:DropDownList ID="drpQuarterDate" runat="server" AutoPostBack="True" SkinID="dropdownlistSkin"
                        OnSelectedIndexChanged="drpQuarterDate_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:CheckBox ID="ckbAllSelect" runat="server" Text="全选" AutoPostBack="True" OnCheckedChanged="ckbAllSelect_CheckedChanged"
                        Height="20px" />
                    <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="保存待发" Width="70px" />
                    <asp:Button ID="btnOk" runat="server" OnClick="btnOk_Click" Text="立即提交" Width="70px"
                        OnClientClick="return confirm('确认要提交吗？');" />
                    <asp:Button ID="btnQuarterResolve" runat="server" Text="分解" OnClick="btnQuarterResolve_Click" />
                    <asp:Button ID="btnModify" runat="server" OnClick="btnModify_Click"  
                        Text="修改" />
                </td>
            </tr>
            <tr>
                <td colspan="8">
                    <div style="height: 18px; width: 98.4%" id="Div1">
                        <table cellpadding="0" cellspacing="1" style="background-color: #d0d0ce;" border="0"
                            width="100%">
                            <tr style="background-color: #ffffff;">
                                <td class="PlanModifyTableHeader" style="width: 4%" align="center">
                                    选择
                                </td>
                                <td class="PlanModifyTableHeader" style="width: 5%" valign="middle" align="center">
                                    计划编号
                                </td>
                                <td class="PlanModifyTableHeader" valign="middle" align="center" style="width: 8%">
                                    开始时间
                                </td>
                                <td class="PlanModifyTableHeader" valign="middle" align="center" style="width: 8%">
                                    完成时间
                                </td>
                                <td class="PlanModifyTableHeader" valign="middle" align="center" style="width: 10%">
                                    计划来源
                                </td>
                                <td class="PlanModifyTableHeader" valign="middle" align="center" style="width: 13%">
                                    计划名称
                                </td>
                                <td class="PlanModifyTableHeader" valign="middle" align="center" style="width: 8%">
                                    责任部门
                                </td>
                                <td class="PlanModifyTableHeader" valign="middle" align="center" style="width: 7%">
                                    责任人<a href="#" onclick="javascript:userinfo(parentNode.firstChild.id );"></a>
                                </td>
                                <td class="PlanModifyTableHeader" valign="middle" align="center" style="width: 7%">
                                    配合部门<a href="#" onclick="javascript:slavedepartment(parentNode.firstChild.id );"></a>
                                </td>
                                <td class="PlanModifyTableHeader" valign="middle" align="center" style="width: 9%">
                                    配合部门责任
                                </td>
                                <td class="PlanModifyTableHeader" valign="middle" style="width: 7%" align="center">
                                    评估人<a href="#" onclick="javascript:userinfo(parentNode.firstChild.id );"></a>
                                </td>
                                <td class="PlanModifyTableHeader" valign="middle" style="width: 7%" align="center">
                                    备注
                                </td>
                                <td class="PlanModifyTableHeader" style="width: 7%" valign="middle" align="center">
                                    操作
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="8">
                    <div style="overflow-y: scroll; height: 500px; width: 100%" id="dvBody">
                        <asp:GridView ID="gdvQuarterPlan" runat="server" AutoGenerateColumns="False" Width="100%"
                            OnPageIndexChanging="gdvQuarterPlan_PageIndexChanging" DataKeyNames="QuarterPlanId,AttachmentPath,PlanSendState,Source,TotalPlanId"
                            SkinID="gridviewSkin" ShowHeader="False">
                            <Columns>
                                <asp:TemplateField HeaderText="选择">
                                    <HeaderStyle Wrap="False" HorizontalAlign="Center" Width="4%" VerticalAlign="Middle" />
                                    <ItemStyle Width="4%" HorizontalAlign="Center" Wrap="False" VerticalAlign="Middle" />
                                    <ItemTemplate>
                                        <asp:CheckBox ID="ckbSelect" runat="server" SkinID="checkboxSkin" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="QuarterPlanSortId" HeaderText="计划编号">
                                    <ItemStyle Width="5%" HorizontalAlign="Center" Wrap="False" VerticalAlign="Middle" />
                                    <HeaderStyle HorizontalAlign="Center" Wrap="False" Width="5%" VerticalAlign="Middle" />
                                </asp:BoundField>
                                <asp:BoundField DataField="StartTime" HeaderText="开始时间" DataFormatString="{0:yyyy-MM-dd}"
                                    HtmlEncode="False">
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="8%" Wrap="False" />
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="8%" Wrap="False" />
                                </asp:BoundField>
                                <asp:BoundField DataField="CompleteTime" HeaderText="完成时间" DataFormatString="{0:yyyy-MM-dd}"
                                    HtmlEncode="False">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="8%" Wrap="False" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="8%" Wrap="False" />
                                </asp:BoundField>
                                <asp:TemplateField FooterText="计划来源">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lbtnSource" runat="server" OnClick="lbtnSource_Click"></asp:LinkButton>
                                    </ItemTemplate>
                                    <HeaderStyle Width="10%" />
                                    <ItemStyle Width="10%" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="WorkItem" HeaderText="计划名称">
                                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="13%" Wrap="True" />
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="13%" Wrap="False" />
                                </asp:BoundField>
                                <asp:BoundField DataField="MasterDepartment" HeaderText="责任部门">
                                    <ItemStyle Width="8%" Wrap="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <HeaderStyle Width="8%" Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:BoundField>
                                <asp:BoundField DataField="MasterPeople" HeaderText="责任人">
                                    <ItemStyle Width="7%" HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <HeaderStyle Width="7%" Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:BoundField>
                                <asp:BoundField DataField="SlaveDepartment" HeaderText="配合部门">
                                    <ItemStyle Width="7%" HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <HeaderStyle Width="7%" Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:BoundField>
                                <asp:BoundField DataField="SlaveDepartmentDuty" HeaderText="配合部门责任">
                                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="9%" />
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="9%" Wrap="False" />
                                </asp:BoundField>
                                <asp:BoundField DataField="EvaluatePeople" HeaderText="评估人">
                                    <HeaderStyle Width="7%" Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <ItemStyle Width="7%" HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Remart" HeaderText="备注">
                                    <HeaderStyle Width="7%" Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <ItemStyle Width="7%" HorizontalAlign="Left" VerticalAlign="Middle" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="操作">
                                    <ItemTemplate>
                                        <asp:Button ID="btnDownLoad" runat="server" OnClick="btnDownLoad_Click" Text="下载"
                                                SkinID="buttonSkin" />
                                            <asp:Label ID="lblAlert" runat="server" Visible="False" SkinID="labelSkin"></asp:Label>
                                        <asp:Button ID="btnDel" Width="50%" runat="server" Text="删除" OnClick="btnDel_Click"
                                            SkinID="ButtonSkin" OnClientClick="return confirm('确认要删除吗？');" />
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="False" Width="7%" HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <ItemStyle Width="7%" HorizontalAlign="Center" VerticalAlign="Middle" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="QuarterPlanId" HeaderText="id" Visible="False" />
                                <asp:BoundField DataField="PlanSendState" HeaderText="发送状态" Visible="False" />
                                <asp:BoundField DataField="Source" HeaderText="计划来源" Visible="False">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" />
                                </asp:BoundField>
                                <asp:BoundField DataField="TotalPlanId" HeaderText="TotalPlanId" Visible="False" />
                            </Columns>
                        </asp:GridView>
                        <table cellpadding="0" cellspacing="1" style="background-color: #d0d0ce;" border="0"
                            width="100%">
                            <tr style="height: 50px; background-color: #ffffff;">
                                <td style="width: 4%">
                                    <input id="Hidden1" style="width: 28px" type="hidden" />
                                </td>
                                <td style="width: 5%" valign="middle">
                                    <input id="txtQuarterPlanSortId" runat="server" style="width: 90%;" type="text" />
                                   <%-- <asp:CompareValidator ID="CompareValidator3" runat="server" ControlToValidate="txtQuarterPlanSortId"
                                        Display="Dynamic" ErrorMessage="计划编号只能为整数" Operator="DataTypeCheck" Type="Integer"
                                        Width="0px"></asp:CompareValidator>--%>
                                </td>
                                <td valign="middle" align="center" style="width: 8%">
                                    <asp:TextBox ID="txtStartTime" runat="server" Width="90%" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                        SkinID="textboxSkin"></asp:TextBox><asp:CompareValidator ID="CompareValidator1" runat="server"
                                            ControlToValidate="txtStartTime" Display="Dynamic" ErrorMessage="日期类型不正确" Operator="DataTypeCheck"
                                            Type="Date" Width="0px"></asp:CompareValidator>
                                </td>
                                <td valign="middle" align="center" style="width: 8%">
                                    <asp:TextBox ID="txtCompleteTime" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                        Width="90%" SkinID="textboxSkin"></asp:TextBox><asp:CompareValidator ID="CompareValidator2"
                                            runat="server" ControlToValidate="txtCompleteTime" Display="Dynamic" ErrorMessage="日期类型不正确"
                                            Operator="DataTypeCheck" Type="Date" Width="0px"></asp:CompareValidator>
                                </td>
                                <td valign="middle" align="center" style="width: 10%">
                                    <asp:DropDownList ID="drpSource" runat="server" Width="80%" Enabled="False">
                                        <asp:ListItem>新增</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td valign="middle" align="center" style="width: 13%">
                                    <asp:TextBox ID="txtWorkItem" runat="server" TextMode="MultiLine" Width="90%" SkinID="textboxMultiLineSkin"></asp:TextBox>
                                </td>
                                <td valign="middle" align="center" style="width: 8%">
                                    <asp:TextBox ID="txtMasterDepartment" Width="90%" runat="server" Enabled="False"
                                        SkinID="textboxSkin"></asp:TextBox>
                                </td>
                                <td valign="middle" align="center" style="width: 7%">
                                    <input id="txtMasterPeople" type="text" runat="server" style="width: 60%;" readonly="readOnly" /><a
                                        href="#" onclick="javascript:userinfo(parentNode.firstChild.id );"><img alt="" style="vertical-align: bottom"
                                            src="../images/addpages.jpg" border="0" /></a>
                                </td>
                                <td valign="middle" align="center" style="width: 7%">
                                    <input id="txtSlaveDepartment" type="text" runat="server" style="width: 60%;" readonly="readOnly" /><a
                                        href="#" onclick="javascript:slavedepartment(parentNode.firstChild.id );"><img alt=""
                                            src="../images/addpages.jpg" style="vertical-align: bottom" border="0" /></a>
                                </td>
                                <td valign="middle" align="center" style="width: 9%">
                                    <asp:TextBox ID="txtSlaveDepartmentDuty" runat="server" TextMode="MultiLine" Width="90%"
                                        SkinID="textboxMultiLineSkin"></asp:TextBox>
                                </td>
                                <td valign="middle" style="width: 7%" align="center">
                                    <input id="txtVerifyPeople" type="text" runat="server" style="width: 60%;" readonly="readOnly" /><a
                                        href="#" onclick="javascript:userinfo(parentNode.firstChild.id );"><img alt="" style="vertical-align: bottom"
                                            src="../images/addpages.jpg" border="0" /></a>
                                </td>
                                <td valign="middle" style="width: 7%" align="center">
                                    <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Width="80%" SkinID="textboxMultiLineSkin"></asp:TextBox>
                                </td>
                                <td style="width: 7%" valign="middle" align="center">
                                    <asp:Button ID="btnAdd" runat="server" Width="90%" Text="确定" OnClick="btnAdd_Click"
                                        SkinID="buttonSkin" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="8">
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
